<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>帧动画</title>
</head>
<body>
<style>
    main{
        width: 500px;
        height: 500px;
        border: 1px solid #ddd;
    }
    div{
        width:100px;
        height: 100px;
        background-color: cyan;
        animation: ck;
        animation-duration: 2s;
        position: relative;
        /*animation-iteration-count:infinite;*/
    }
    @keyframes ck {
        /*from{*/
        /*    background-color: #fff;*/
        /*    top: 0;*/
        /*    left: 0;*/
        /*}*/

        /*50%{*/
        /*    transform: scale(.5);*/
        /*}*/

        /*to{*/
        /*    background-color: purple;*/
        /*    top: 400px;*/
        /*    left: 400px;*/
        /*}*/

        from{
            transform: translateX(0);
        }
        25%{
            transform: translateX(400px);
        }
        50%{
            transform: translate(400px, 400px);
        }
        75% {
            transform: translateY(400px);
        }
        to{
            transform: translate(0,0);
        }
    }
</style>
<main>
    <div></div>
</main>
</body>
</html>
